#include "iostream"
#include "cstring"

using namespace std;

class MyTime
{
  private:
    int hour, minute, second;
    public:
      void SetTime(int, int, int);
      void print_12();
      void print_24();
};

void MyTime::SetTime(int a, int b, int c)
{
  hour = (a >= 0 && a < 24) ? a : 0;
	minute = (b >= 0 && b < 60) ? b : 0;
	second = (c >= 0 && c < 60) ? c : 0;
}